package com.joysuch.wwyt.edu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.edu.bean.WwytEduCertificateQueryParam;
import com.joysuch.wwyt.edu.bean.WwytEduCertificateUserVo;
import com.joysuch.wwyt.edu.entity.WwytEduCertificateUser;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author pp
 * @since 2021-04-15
 */
@Service
public interface WwytEduCertificateUserService extends IService<WwytEduCertificateUser> {

    void insert(WwytEduCertificateUser entity);

    WwytEduCertificateUserVo findOne(Long id);

    ResultBean findPage(WwytEduCertificateQueryParam param);

    WwytEduCertificateUser checkNeedUpdate(Long userId,Boolean userContractorFlag, Long certificateId, String certNo);

    List<WwytEduCertificateUser> selectByCertIds(List<Long> idList);

    /**
     * 查看过期的证书
     * @return
     */
    List<WwytEduCertificateUser> findCertificates(Date date, String certStatus);

    /**
     * 查询待过期的证书
     *
     * @param date
     * @param certStatus
     * @return
     */
    List<WwytEduCertificateUser> findFutureCertificates(Date date, String certStatus);
}
